package com.visionblue.business.ship.model.enums

/**
 * @author: xlh
 * @date: 2020-05-21 6:39 PM
 * @desc:
 */
enum class ApplicationRecordStatusEnum(val status: Int, val statusText: String) {

    PENDING(1, "待接单"),
    PROCESSING(2, "进行中"),
    COMPLETED(3, "已完成"),
    CLOSED(4, "已关闭"),

    ;

    fun isGreen() = this == PROCESSING

    companion object {

        fun getRecordStatusEnum(status: Int?): ApplicationRecordStatusEnum? {
            return values().find { it.status == status }
        }
    }

}